<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>清空被选中的元素及其子元素</title>
		<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="div1">
			<p title="1">div中的段落1</p>
			<p title="2">div中的段落2</p>
		</div>
		<button type="button" name="bu">清空THML元素</button>
	</body>
</html>
<script type="text/javascript">
	$(() => {
		$("button[name ='bu']").click(()=>{
			$(".div1").empty();
		})
	})
</script>
